package com.lightningtrade.service.impl;

import com.lightningtrade.domain.SysOperLog;
import com.lightningtrade.mapper.SysOperLogMapper;
import com.lightningtrade.service.SysOperLogService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class SysOperLogServiceImpl implements SysOperLogService {

    private final SysOperLogMapper sysOperLogMapper;

    @Override
    public void save(SysOperLog operLog) {
        sysOperLogMapper.insertOperLog(operLog);
    }

    @Override
    public List<SysOperLog> findOperLogs(SysOperLog operLog) {
        return sysOperLogMapper.selectOperLogs(operLog);
    }

    @Override
    public void deleteOperLogById(Long id) {
        sysOperLogMapper.deleteOperLogById(id);
    }

    @Override
    public void clearOperLogs() {
        sysOperLogMapper.clearOperLogs();
    }
}
